ADB 常用指令
ADB 常用指令
显示连接到计算机的设备
adb devices多设备连接时指定操作设备
adb -s "设备SN" "Cmd"安装 APK
adb install -r test.apk卸载 APK
adb uninstall com.example.android.backgroundPC 传文件到 Android
adb push ./thing.zip /storage/sdcard0/PC 获取 Android 文件
adb pull /storage/sdcard0/thing.zip ./启动指定 App 的指定 Activity
adb shell am start -n com.android.settings/com.android.settings.Settings、关闭指定 App
adb shell am force-stop com.android.settings清除指定 App 数据
adb shell pm clear com.example.android.background查看第三方应用
adb shell pm list packages -3手机电量
adb shell dumpsys battery set level 100模拟手机从 USB 充电器上拔掉 Android 6.0 以上
adb shell dumpsys battery unplug重新插入手机 Android 6.0 以上
adb shell dumpsys battery reset切换系统为非充电状态
adb shell dumpsys battery set status 1